<template>
	<view class="add page c00">
		<view class="bgf7 p12">
			<view class="bgff px14 pb10">

				<view class="flex flexC borb py12">
					<text class="flex1">快递单号</text>
					<input v-model="name" class="aliR py3" placeholder="请输入快递单号" />
					<text class="arrowR ml3"></text>

				</view>





			</view>
			<view class="flex flexC flexJC py20">
				<view class="aliC py12 w-17 bg41 r40" @click="save">发快递</view>
			</view>



		</view>




	</view>
</template>

<script>
	export default {
		data() {
			return {

				name: '',
				order_no: ''

			};
		},
		onLoad(option) {
			this.order_no = option.order_no;
		},

		onShow() {

		},
		methods: {

			save() {

				if (this.name == '') {

					uni.showToast({
						title: "请填写快递单号",
						icon: 'none'
					})
					return;
				}


				let param = {
					kd: this.name,
					order_no: this.order_no
				};
				let that = this;
				this.$api.sendKd(param).then(res => {

					if (res.code == 1) {
						uni.showModal({
							title: "发货提示",
							content: "发货成功",
							showCancel: false,
							complete() {
								uni.navigateBack({
									delta: 1
								})
							}
						})
					} else {
						uni.showToast({
							title: res.msg,
							icon: 'none'
						})
					}
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.add {
		.w48 {
			width: 96rpx;
			height: 96rpx;
		}

		.imgbox {
			width: 164rpx;
			height: 164rpx;
			background-color: #E8E8E8;
			position: relative;

			image {
				width: 100%;
				height: 100%;
			}

			.del {
				width: 36rpx;
				height: 36rpx;
				background: rgba(181, 180, 180, .8);
				position: absolute;
				top: -12rpx;
				right: -12rpx;
			}
		}
	}

	.popup-content2 {
		background: #FFFFFF;

		.popup-btn {
			width: 100%;
			height: 100rpx;
			line-height: 100rpx;
			text-align: center;
			border-bottom: 1px solid #f5f5f5;
			background: #FFFFFF;
		}

		.button {
			width: 100%;
			height: 100rpx;
			line-height: 100rpx;
			text-align: center;
			border-bottom: 1px solid #f5f5f5;
			background: #FFFFFF;
			font-size: 11pt;
		}

		button::after {
			border: none;
		}

		.pt20 {
			border-bottom: 20rpx solid #f5f5f5;
		}
	}
</style>